import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 用于实现算法流程
 * */


public class Control {
    public static void main(String[] args) {
        AhpAlgorithm ahpAlgorithm = new AhpAlgorithm();
        FuzzyAlgorithm fuzzyAlgorithm = new FuzzyAlgorithm();
        Double[] weight = ahpAlgorithm.ahp();//调用层次分析法来计算指标权重值
        Double[][] initial = new Double[5][5];//初始矩阵用来存放从数据库中读取到并且经过对应隶属度函数运算得到的值
        Double[][] second = new Double[5][5];//存放初始矩阵经过转置后得到的矩阵
        fuzzyAlgorithm.matrixTranspose(initial,second);//矩阵转置
        Double[] third = {0.0,0.0,0.0,0.0,0.0};//对传入的数组赋初值，否则运算会抛空指针异常
        Double[] threaten = fuzzyAlgorithm.matrixMultiplication(weight,second,third);//矩阵乘法运算
        List<Double> list = new ArrayList<>(Arrays.asList(threaten));//将威胁值数组放入集合中
    }

}
